solidify duplicate sort states in testo
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Thu, 12 Jun 2003 23:54:04 +0000 (23:54 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Thu, 12 Jun 2003 23:54:04 +0000 (23:54 +0000)
gpsbabel/testo

index cdfc4cd19efb2b5c540e69baadefd1854087c775..d9ffc76c47ffd3aea14bf6ae953d04ec7486cf4e 100755 (executable)
@@ -14,6 +14,13 @@ compare()
        } 
 }
 
+sort_and_compare()
+{
+       sort $1 > $TMPDIR/s1
+       sort $2 > $TMPDIR/s2
+       compare $TMPDIR/s1 $TMPDIR/s2
+}
+
 
 # Geocaching .loc
 rm -f ${TMPDIR}/gl.loc
@@ -227,7 +234,7 @@ rm -f ${TMPDIR}/filterdupe.csv1 ${TMPDIR}/filterdupe.csv2
 ${PNAME} -i geo -f geocaching.loc -o csv -F ${TMPDIR}/filterdupe.csv1
 ${PNAME} -i geo -f geocaching.loc -f geocaching.loc -x duplicate,shortname \
                -o csv -F ${TMPDIR}/filterdupe.csv2
-compare ${TMPDIR}/filterdupe.csv1 ${TMPDIR}/filterdupe.csv2
+sort_and_compare ${TMPDIR}/filterdupe.csv1 ${TMPDIR}/filterdupe.csv2
 
 #
 # Position filter -  Since very small distances are essentialy a duplicate 
@@ -237,7 +244,7 @@ rm -f ${TMPDIR}/filterpos.csv1 ${TMPDIR}/filterpos.csv2
 ${PNAME} -i geo -f geocaching.loc -o csv -F ${TMPDIR}/filterpos.csv1
 ${PNAME} -i geo -f geocaching.loc -f geocaching.loc -x position,distance=5f \
                -o csv -F ${TMPDIR}/filterpos.csv2
-compare ${TMPDIR}/filterpos.csv1 ${TMPDIR}/filterpos.csv2
+sort_and_compare ${TMPDIR}/filterpos.csv1 ${TMPDIR}/filterpos.csv2
 
 #
 # Radius filter